package com.example.server.controller;

import com.example.server.bean.Admin;
import com.example.server.service.IAdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;
import java.util.List;

/**
 * ProjectName: yeb
 * Author: 别怿言
 * Date: 2023-02-14 23:19
 * Description：聊天接口
 */
@Api(tags = "Chat")
@RestController
@RequestMapping("/chat")
public class ChatController {

    @Autowired
    private IAdminService adminService;

    @ApiOperation(value = "获取操作员")
    @GetMapping("/admin")
    public List<Admin> getAllAdmin(String keywords){
        return adminService.getAllAdmins(keywords);
    }

}
